import 'dart:convert';

import 'config.dart';

enum ChainType { btc, btcTestnet, eth, tron, aptos, sol }

class EVMInfo {
  int chainId;
  List<String> rpcList;

  EVMInfo({required this.chainId, required this.rpcList});

  // @override
  // String toString() {
  //   return "{'chainId': '$chainId', 'rpcList': ${jsonEncode(rpcList)}}";
  // }

  Map<String, dynamic> toJson() {
    return {
      'chainId': chainId,
      'rpcList': rpcList,
    };
  }

  @override
  String toString() {
    return jsonEncode(toJson());
  }
}

class Chain {
  ChainType type;
  String name; //对外展示
  String shortName; //做唯一标识
  String symbol;
  String logo;
  String derivePath;
  String? blockExplorerUrl;
  String? blockExplorerApi;
  EVMInfo? evmInfo;

  Chain(
      {required this.type,
      required this.name,
      required this.shortName,
      required this.symbol,
      required this.logo,
      required this.derivePath,
      this.blockExplorerUrl,
      this.blockExplorerApi,
      this.evmInfo});

  bool isCustomEVMChain() {
    return shortName.startsWith(Config.customChainShortNamePrefix);
  }

  bool isEVM() {
    return null != evmInfo;
  }

  bool isBtcOrBtcTestnet() {
    return type == ChainType.btc || type == ChainType.btcTestnet;
  }

  Map<String, dynamic> toJson() {
    return {
      'type': type.name.toString(),
      'name': name,
      'shortName': shortName,
      'symbol': symbol,
      'logo': logo,
      'derivePath': derivePath,
      'blockExplorerUrl': blockExplorerUrl,
      'blockExplorerApi': blockExplorerApi,
      'evmInfo': evmInfo?.toJson(),
    };
  }


  // @override
  // String toString() {
  //   return '{"type": "$type", "name": "$name", "shortName": "$shortName", "symbol": "$symbol", "logo": "$logo", "derivePath": "$derivePath", "blockExplorerUrl": "$blockExplorerUrl", "blockExplorerApi": "$blockExplorerApi", "evmInfo": "${evmInfo.toString()}"';
  // }
  @override
  String toString() {
    return jsonEncode(toJson());
  }
}

class ChainList {
  static final _instance = ChainList.init();

  ChainList.init();

  factory ChainList() {
    return _instance;
  }

  static const String _derivePathBTC = "m/44'/0'/0'/0/0";
  static const String _derivePathBTCTestnet = "m/44'/0'/0'/0/0";
  static const String _derivePathEVM = "m/44'/60'/0'/0/0";
  static const String _derivePathTRON = "m/44'/195'/0'/0/0";
  static const String _derivePathAptos = "m/44'/637'/0'/0/0";
  static const String _derivePathSol = "m/44'/501'/0'/0'";

  static const String _logoBTC = 'assets/icon/BTC.png';
  static const String _logoBTCTestnet = 'assets/icon/BTC_TEST.png';
  static const String _logoETH = 'assets/icon/ETH.png';
  static const String _logoTRON = 'assets/icon/TRX.png';
  static const String _logoAPTOS = 'assets/icon/APTOS.png';
  static const String _logoOMP = 'assets/icon/OMP.png';
  static const String _logoBSC = 'assets/icon/BNB.png';
  static const String _logoPolygon = 'assets/icon/POLYGON.png';
  static const String _logoOptimism = 'assets/icon/OPTIMISM.png';
  static const String _logoArbitrum = 'assets/icon/Arbitrum.png';
  static const String _logoOKT = 'assets/icon/OKT.png';
  static const String _logoGnosis = 'assets/icon/GNOSIS.png';
  static const String _logoFantom = 'assets/icon/FANTOM.png';
  static const String _logoAvalanche = 'assets/icon/AVALANCHE.png';
  static const String _logoMoonbeam = 'assets/icon/MOONBEAM.png';
  static const String _logoCronos = 'assets/icon/CRONOS.png';
  static const String _logoCelo = 'assets/icon/CELO.png';
  static const String _logoLinea = 'assets/icon/LINEA.png';
  static const String _logoBase = 'assets/icon/BASE.png';
  static const String _logoKava = 'assets/icon/KAVA.png';
  static const String _logoPulse = 'assets/icon/PULSE.png';
  static const String _logoMantle = 'assets/icon/MANTLE.png';
  static const String _logoHeco = 'assets/icon/HECO.png';
  static const String _logoAstar = 'assets/icon/ASTAR.png';
  static const String _logoDoge = 'assets/icon/DOGE.png';
  static const String _logoEtc = 'assets/icon/ETC.png';
  static const String _logoBitgert = 'assets/icon/BITGERT.png';
  static const String _logoKlaytn = 'assets/icon/KLAYTN.png';
  static const String _logoRootstock = 'assets/icon/ROOTSTOCK.png';
  static const String _logoAurora = 'assets/icon/AURORA.png';
  static const String _logoTelos = 'assets/icon/TELOS.png';
  static const String _logoMeter = 'assets/icon/METER.png';
  static const String _logoSongbird = 'assets/icon/SONGBIRD.png';
  static const String _logoCore = 'assets/icon/CORE.png';
  static const String _logoHarmony = 'assets/icon/HARMONY.png';

  static String get derivePathEVM => _derivePathEVM;
  static String get derivePathTRON => _derivePathTRON;
  static String get derivePathSol => _derivePathSol;

  static final List<Chain> networkExcludeChains = [pulseChain, mantleChain];

  late List<Chain> _chains = [];

  List<Chain> get chains => _chains;

  // 存 链
  setChainsList(List<Chain> list) {
    _chains = list;
  }

  removeChain(Chain oldChain) {
    _chains.remove(oldChain);
  }

  addAllChains(List<Chain> lists) {
    _chains.addAll(lists);
  }

  addChain(Chain list) {
    _chains.add(list);
  }

  //目前显示支持的链
  static final List<Chain> allSupportChains = [
    // ompChain,
    bscChain,
    polygonChain,
    ethChain,
    btcChain,
    okChain,
    tronChain,
    polygonChain,
    optimismChain,
    arbitrumChain,
    ethereumClassicChain,
    dogChain,
    coreChain,
    gnosisChain,
    // hecoChain,
    fantomChain,
    snowtraceChain,
    moonbeamChain,
    cronosChain,
    celoChain,
    lineaChain,
    baseChain,
    kavaChain,
    pulseChain,
    mantleChain,
    // astarChain,
    bitgertChain,
    // klaytnChain,
    rootstockChain,
    auroraChain,
    // telosChain,
    // meterChain,
    songbirdChain,
    // harmonyChain,
    btcTestChain
  ];

  /// ***********************************BTC系******************************
  static final Chain btcChain = Chain(
      type: ChainType.btc,
      name: 'BTC',
      shortName: 'BTC',
      symbol: 'BTC',
      logo: _logoBTC,
      derivePath: _derivePathBTC,
      blockExplorerUrl: 'https://mempool.space/');

  static final Chain btcTestChain = Chain(
      type: ChainType.btcTestnet,
      name: 'BTC Testnet',
      shortName: 'BTC Testnet',
      symbol: 'tBTC',
      logo: _logoBTCTestnet,
      derivePath: _derivePathBTCTestnet,
      blockExplorerUrl: 'https://mempool.space/testnet/');

  /// ***********************************BTC系******************************

  /// ***********************************TRON系******************************
  static final Chain tronChain = Chain(
      type: ChainType.tron,
      name: 'TRON',
      shortName: 'TRON',
      symbol: 'TRX',
      logo: _logoTRON,
      derivePath: _derivePathTRON,
      blockExplorerUrl: 'https://tronscan.org/#/');

  /// ***********************************TRON系******************************

  /// ***********************************Aptos系******************************
  static final Chain aptosChain = Chain(
      type: ChainType.aptos,
      name: 'APT',
      shortName: 'APT',
      symbol: 'APT',
      logo: _logoAPTOS,
      derivePath: _derivePathAptos);

  /// ***********************************Aptos系******************************

  /// ***********************************EVM系******************************
  static final Chain ethChain = Chain(
      type: ChainType.eth,
      name: 'ETH',
      shortName: 'ETH',
      symbol: 'ETH',
      logo: _logoETH,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://etherscan.io/",
      evmInfo: EVMInfo(
          chainId: 1,
          rpcList: ["https://rpc.ankr.com/eth", "https://1rpc.io/eth"]));

  static final Chain ompChain = Chain(
      type: ChainType.eth,
      name: 'OMP',
      shortName: 'OMP',
      symbol: 'OMP',
      logo: _logoOMP,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://onemorepay.top/",
      evmInfo: EVMInfo(
          chainId: 11552,
          rpcList: ["https://ompchain.com", "https://sg1.ompnode.top"]));

  static final Chain bscChain = Chain(
      type: ChainType.eth,
      name: 'BSC',
      shortName: 'BSC',
      symbol: 'BNB',
      logo: _logoBSC,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://bscscan.com/",
      evmInfo: EVMInfo(
          chainId: 56,
          rpcList: ["https://rpc.ankr.com/bsc", "https://1rpc.io/bnb"]));

  static final Chain polygonChain = Chain(
      type: ChainType.eth,
      name: 'POLYGON',
      shortName: 'POLYGON',
      symbol: 'MATIC',
      logo: _logoPolygon,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://polygonscan.com/",
      evmInfo: EVMInfo(chainId: 137, rpcList: [
        "https://rpc.ankr.com/polygon",
        "https://1rpc.io/matic",
        "https://polygon-rpc.com"
      ]));

  static final Chain optimismChain = Chain(
      type: ChainType.eth,
      name: 'OPTIMISM',
      shortName: 'OPTIMISM',
      symbol: 'ETH',
      logo: _logoOptimism,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://optimistic.etherscan.io/",
      evmInfo: EVMInfo(chainId: 10, rpcList: [
        "https://rpc.ankr.com/optimism",
        "https://1rpc.io/op",
        "https://mainnet.optimism.io"
      ]));

  static final Chain arbitrumChain = Chain(
      type: ChainType.eth,
      name: 'ARBITRUM',
      shortName: 'ARBITRUM',
      symbol: 'ETH',
      logo: _logoArbitrum,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://arbiscan.io/",
      evmInfo: EVMInfo(
          chainId: 42161,
          rpcList: ["https://rpc.ankr.com/arbitrum", "https://1rpc.io/arb"]));

  static final Chain okChain = Chain(
      type: ChainType.eth,
      name: 'OKC',
      shortName: 'OKC',
      symbol: 'OKT',
      logo: _logoOKT,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://www.oklink.com/en/okc/",
      evmInfo: EVMInfo(chainId: 66, rpcList: ["https://exchainrpc.okex.org"]));

  static final Chain gnosisChain = Chain(
      type: ChainType.eth,
      name: 'Gnosis',
      shortName: 'Gnosis',
      symbol: 'XDAI',
      logo: _logoGnosis,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://gnosisscan.io/",
      evmInfo: EVMInfo(chainId: 100, rpcList: [
        "https://rpc.gnosischain.com",
        "https://rpc.ankr.com/gnosis"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x4ECaBa5870353805a9F068101A40E0f32ed605C6

  static final Chain fantomChain = Chain(
      type: ChainType.eth,
      name: 'Fantom',
      shortName: 'Fantom',
      symbol: 'FTM',
      logo: _logoFantom,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://ftmscan.com/",
      evmInfo: EVMInfo(chainId: 250, rpcList: [
        "https://rpcapi.fantom.network",
        "https://rpc.ankr.com/fantom"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //TUSD -> 0x9879aBDea01a879644185341F7aF7d8343556B7a

  static final Chain snowtraceChain = Chain(
      type: ChainType.eth,
      name: 'Avalanche',
      shortName: 'Avalanche',
      symbol: 'AVAX',
      logo: _logoAvalanche,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://snowtrace.io/",
      evmInfo: EVMInfo(chainId: 43114, rpcList: [
        "https://rpc.ankr.com/avalanche",
        "https://avalanche-c-chain.publicnode.com"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7

  static final Chain moonbeamChain = Chain(
      type: ChainType.eth,
      name: 'Moonbeam',
      shortName: 'Moonbeam',
      symbol: 'GLMR',
      logo: _logoMoonbeam,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://moonscan.io/",
      evmInfo: EVMInfo(chainId: 1284, rpcList: [
        "https://rpc.api.moonbeam.network",
        "https://rpc.ankr.com/moonbeam"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0xeFAeeE334F0Fd1712f9a8cc375f427D9Cdd40d73

  static final Chain cronosChain = Chain(
      type: ChainType.eth,
      name: 'Cronos',
      shortName: 'Cronos',
      symbol: 'CRO',
      logo: _logoCronos,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://cronoscan.com/",
      evmInfo: EVMInfo(chainId: 25, rpcList: [
        "https://cronos-evm.publicnode.com",
        "https://1rpc.io/cro"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x66e428c3f67a68878562e79A0234c1F83c208770

  static final Chain celoChain = Chain(
      type: ChainType.eth,
      name: 'Celo',
      shortName: 'Celo',
      symbol: 'CELO',
      logo: _logoCelo,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://celoscan.io/",
      evmInfo: EVMInfo(
          chainId: 42220,
          rpcList: ["https://forno.celo.org", "https://rpc.ankr.com/celo"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x617f3112bf5397D0467D315cC709EF968D9ba546

  static final Chain lineaChain = Chain(
      type: ChainType.eth,
      name: 'Linea',
      shortName: 'Linea',
      symbol: 'ETH',
      logo: _logoLinea,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://lineascan.build/",
      evmInfo: EVMInfo(
          chainId: 59144,
          rpcList: ["https://rpc.linea.build", "https://1rpc.io/linea"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0xA219439258ca9da29E9Cc4cE5596924745e12B93

  static final Chain baseChain = Chain(
      type: ChainType.eth,
      name: 'Base',
      shortName: 'Base',
      symbol: 'ETH',
      logo: _logoBase,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://basescan.org/",
      evmInfo: EVMInfo(chainId: 8453, rpcList: [
        "https://mainnet.base.org",
        "https://base.publicnode.com"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDC -> 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

  static final Chain kavaChain = Chain(
      type: ChainType.eth,
      name: 'Kava',
      shortName: 'Kava',
      symbol: 'KAVA',
      logo: _logoKava,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://kavascan.com/",
      evmInfo: EVMInfo(
          chainId: 2222,
          rpcList: ["https://evm.kava.io", "https://kava-evm.publicnode.com"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDt -> 0x919C1c267BC06a7039e03fcc2eF738525769109c

  static final Chain pulseChain = Chain(
      type: ChainType.eth,
      name: 'Pulse',
      shortName: 'Pulse',
      symbol: 'PLS',
      logo: _logoPulse,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://scan.pulsechain.com/",
      evmInfo: EVMInfo(chainId: 369, rpcList: [
        "https://rpc.pulsechain.com",
        "https://kava-evm.publicnode.com"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0xdAC17F958D2ee523a2206206994597C13D831ec7

  static final Chain mantleChain = Chain(
      type: ChainType.eth,
      name: 'Mantle',
      shortName: 'Mantle',
      symbol: 'MNT',
      logo: _logoMantle,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://mantlescan.info/",
      evmInfo: EVMInfo(
          chainId: 5000,
          rpcList: ["https://rpc.mantle.xyz", "https://rpc.ankr.com/mantle"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE

  static final Chain hecoChain = Chain(
      type: ChainType.eth,
      name: 'Heco',
      shortName: 'Heco',
      symbol: 'HT',
      logo: _logoHeco,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://hecoscan.io/#/",
      evmInfo: EVMInfo(chainId: 128, rpcList: [
        "https://http-mainnet.hecochain.com",
        "https://http-mainnet-node.huobichain.com"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0xa71edc38d189767582c38a3145b5873052c3e47a

  static final Chain astarChain = Chain(
      type: ChainType.eth,
      name: 'Astar',
      shortName: 'Astar',
      symbol: 'ASTR',
      logo: _logoAstar,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://astar.subscan.io/",
      evmInfo: EVMInfo(
          chainId: 592,
          rpcList: ["https://evm.astar.network", "https://1rpc.io/astr"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x3795C36e7D12A8c252A20C5a7B455f7c57b60283

  static final Chain dogChain = Chain(
      type: ChainType.eth,
      name: 'Doge',
      shortName: 'Doge',
      symbol: 'DOGE',
      logo: _logoDoge,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://explorer.dogechain.dog/",
      evmInfo: EVMInfo(chainId: 2000, rpcList: [
        "https://rpc.dogechain.dog",
        "https://rpc-sg.dogechain.dog"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDC -> 0x765277EebeCA2e31912C9946eAe1021199B39C61

  static final Chain ethereumClassicChain = Chain(
      type: ChainType.eth,
      name: 'Ethereum Classic',
      shortName: 'Ethereum Classic',
      symbol: 'ETC',
      logo: _logoEtc,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://etc.blockscout.com/",
      evmInfo: EVMInfo(chainId: 61, rpcList: [
        "https://geth-de.etc-network.info",
        "https://geth-at.etc-network.info"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //BTCC -> 0xca413215abB99f983359e058dCbF732363B14ac6

  static final Chain bitgertChain = Chain(
      type: ChainType.eth,
      name: 'Bitgert',
      shortName: 'Bitgert',
      symbol: 'BRISE',
      logo: _logoBitgert,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://brisescan.com/",
      evmInfo: EVMInfo(chainId: 32520, rpcList: [
        "https://flux-rpc.brisescan.com",
        "https://flux-rpc1.brisescan.com"
      ]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11

  static final Chain klaytnChain = Chain(
      type: ChainType.eth,
      name: 'Klaytn',
      shortName: 'Klaytn',
      symbol: 'KLAY',
      logo: _logoKlaytn,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://scope.klaytn.com/",
      evmInfo: EVMInfo(
          chainId: 8217,
          rpcList: ["https://1rpc.io/klay", "https://klaytn.drpc.org"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //oUSDT -> 0xcee8faf64bb97a73bb51e115aa89c17ffa8dd167

  static final Chain rootstockChain = Chain(
      type: ChainType.eth,
      name: 'Rootstock',
      shortName: 'Rootstock',
      symbol: 'RBTC',
      logo: _logoRootstock,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://rootstock.blockscout.com/",
      evmInfo: EVMInfo(
          chainId: 30,
          rpcList: ["https://public-node.rsk.co", "https://mycrypto.rsk.co"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //XUSD -> 0xb5999795BE0eBb5BAb23144Aa5fD6a02d080299f

  static final Chain auroraChain = Chain(
      type: ChainType.eth,
      name: 'Aurora',
      shortName: 'Aurora',
      symbol: 'ETH',
      logo: _logoAurora,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://explorer.aurora.dev/",
      evmInfo: EVMInfo(
          chainId: 1313161554,
          rpcList: ["https://mainnet.aurora.dev", "https://1rpc.io/aurora"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT.e -> 0x4988a896b1227218e4A686fdE5EabdcAbd91571f

  static final Chain telosChain = Chain(
      type: ChainType.eth,
      name: 'Telos',
      shortName: 'Telos',
      symbol: 'TLOS',
      logo: _logoTelos,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://www.teloscan.io/",
      evmInfo:
          EVMInfo(chainId: 40, rpcList: ["https://mainnet.telos.net/evm"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x975Ed13fa16857E83e7C493C7741D556eaaD4A3f

  static final Chain meterChain = Chain(
      type: ChainType.eth,
      name: 'Meter',
      shortName: 'Meter',
      symbol: 'MTR',
      logo: _logoMeter,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://scan.meter.io/",
      evmInfo: EVMInfo(chainId: 82, rpcList: ["https://rpc.meter.io"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x5fa41671c48e3c951afc30816947126ccc8c162e

  static final Chain songbirdChain = Chain(
      type: ChainType.eth,
      name: 'Songbird',
      shortName: 'Songbird',
      symbol: 'SGB',
      logo: _logoSongbird,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://songbird-explorer.flare.network/",
      evmInfo: EVMInfo(chainId: 19, rpcList: ["https://rpc.ftso.au/songbird"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11

  static final Chain coreChain = Chain(
      type: ChainType.eth,
      name: 'Core',
      shortName: 'Core',
      symbol: 'CORE',
      logo: _logoCore,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://scan.coredao.org/",
      evmInfo: EVMInfo(chainId: 1116, rpcList: ["https://rpc.coredao.org"]));

  //MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
  //USDT -> 0x900101d06A7426441Ae63e9AB3B9b0F63Be145F1

  static final Chain harmonyChain = Chain(
      type: ChainType.eth,
      name: 'Harmony',
      shortName: 'Harmony',
      symbol: 'ONE',
      logo: _logoHarmony,
      derivePath: _derivePathEVM,
      blockExplorerUrl: "https://explorer.harmony.one/",
      evmInfo:
          EVMInfo(chainId: 1666600000, rpcList: ["https://api.harmony.one"]));
//MULTICALL3 -> 0xcA11bde05977b3631167028862bE2a173976CA11
//USDT -> 0x9A89d0e1b051640C6704Dde4dF881f73ADFEf39a

  /// ***********************************EVM系******************************
}
